
typedef unsigned long uint32;
typedef unsigned char uint8;

#define SHA_BLOCKSIZE	64
#define SHA_DIGESTSIZE	20

typedef struct _SHA1_CTX {
	uint32 data[ 16 ];		/* SHA data buffer */
	uint32 digest[ 5 ];		
	uint32 countHi, countLo;	/* 64-bit byte count */
}SHA1_CTX;


#define BIG_ENDIAN 1


void Sha1Init(SHA1_CTX *);
void Sha1Update(SHA1_CTX *, uint8 const *, uint32);
void Sha1Final(SHA1_CTX *, uint8 *);
void Sha1Transform(SHA1_CTX *);
